# encoding: utf-8
from flask_marshmallow import base_fields
from app.modules.common.parameters import BaseParameters, Parameters


class ZoneListParameters(Parameters):
    env_name = base_fields.String(
        required = True,
    )
    zone_code = base_fields.String(
        required = False,
        missing = None,
    )


class ZoneAddParameters(BaseParameters):
    env_name = base_fields.String(
        required = True,
    )
    zone_code = base_fields.String(
        required = True,
    )
    zone_alias = base_fields.String(
        required = True,
    )
    zone_title = base_fields.String(
        required = True,
    )
    parent_code = base_fields.String(
        required = False,
        missing = None
    )


class ZoneDelParameters(BaseParameters):
    env_name = base_fields.String(
        required = True,
    )
    zone_code = base_fields.String(
        required = True,
    )


class UpdateOperateGroupParameters(BaseParameters):
    env_name = base_fields.String(
        required = True,
    )
    zone_code = base_fields.String(
        required = True,
    )
    operate_group = base_fields.String(
        required = True,
        enum = ['A', 'B', 'NONE']
    )
